
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Preparing to use the Oracle database</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp66.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp68.htm" >Next</A>
<!-- End Header -->
<A NAME="CCJEAHBJ"></A><h1>Preparing to use the Oracle database</h1>
<A NAME="TI1382"></A><p>Before you define the database interface and connect to an
Oracle database in PowerBuilder, follow these steps to prepare the
database for use: <A NAME="TI1383"></A>
<ol>
</li>
<li class=ds>Install and configure the required
database server, network, and client software.</li>
<li class=ds>Install the native Oracle database interface for
the version of Oracle you want to access.</li>
<li class=ds>Verify that you can connect to the Oracle server
and database outside PowerBuilder.</li>
<li class=ds>(ORA driver only) Determine whether you want to
use connection pooling or session pooling.
</li>
</ol>
</p>
<A NAME="TI1384"></A><p>Preparing an Oracle database for use with PowerBuilder involves
these basic tasks.</p>
<A NAME="TI1385"></A><h4>Step 1: Install and configure the database server</h4>
<A NAME="TI1386"></A><p>You must install and configure the database server, network,
and client software for Oracle.</p>
<A NAME="TI1387"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To install and configure the database server,
network, and client software:</p>
<ol><li class=fi><p>Make sure the Oracle database software
is installed on your computer or on the server specified in your
database profile.</p><p>For example, with the Oracle O90 interface you can access
an Oracle9<i>i </i>or Oracle 10<i>g</i> database
server. </p><p>You must obtain the database server software from Oracle Corporation.</p><p>For installation instructions, see your Oracle
documentation.</p></li>
<li class=ds><p>Make sure the supported network software (such
as TCP/IP) is installed and running on your computer and
is properly configured so that you can connect to the Oracle database
server at your site.</p><p>The Hosts and Services files must be present on your computer
and properly configured for your environment. </p><p>You must obtain the network software from your network vendor
or database vendor.</p><p>For installation and configuration instructions,
see your network or database administrator.</p></li>
<li class=ds><p>Install the required Oracle client software on
each client computer on which PowerBuilder is installed.</p><p>You must obtain the client software from Oracle Corporation.
Make sure the client software version you install supports <i>all</i> of
the following:<A NAME="TI1388"></A>
<ul>
<li class=fi>The operating
system running on the client computer</li>
<li class=ds>The version of the database that you want to access</li>
<li class=ds>The version of PowerBuilder that you are running
</li>
</ul>
</p><p>Oracle 10<i>g</i> Instant Client is free client
software that lets you run applications without installing the standard
Oracle client software. It has a small footprint and can be freely
redistributed.</p></li>
<li class=ds><p>Make sure the Oracle client software is properly
configured so that you can connect to the Oracle database server
at your site.</p><p>For information about setting up Oracle configuration
files, see your Oracle Net documentation.</p></li>
<li class=ds><p>If required by your operating system, make sure
the directory containing the Oracle client software is in your system
path.</p></li></ol>
<br><A NAME="TI1389"></A><h4>Step 2: Install the database interface</h4>
<A NAME="TI1390"></A><p>In the PowerBuilder Setup program, select the Typical install
or select the Custom install and select the Oracle database interfaces
you require. </p>
<A NAME="TI1391"></A><p>For a list of the Oracle database interfaces
available, see <A HREF="connpbp64.htm#CCJDFIBD">"Supported versions for Oracle"</A>.</p>
<A NAME="TI1392"></A><h4>Step 3: Verify the connection </h4>
<A NAME="TI1393"></A><p>Make sure you can connect to the Oracle database server and
log in to the database you want to access from outside PowerBuilder.</p>
<A NAME="TI1394"></A><p>Some possible ways to verify the connection are by running
the following Oracle tools:<A NAME="TI1395"></A>
<ul>
<li class=fi><b>Accessing the database server</b>   Tools such as Oracle <b>TNSPING</b> (or any other <b>ping</b> utility)
check whether you can reach the database server from your computer.</li>
<li class=ds><b>Accessing the database</b>   Tools such as <b>Oracle SQL*Plus</b> check
whether you can log in to the Oracle database you want to access
and perform database operations. It is a good idea to specify the
same connection parameters you plan to use in your PowerBuilder database
profile to access the database.
</li>
</ul>
</p>
<A NAME="TI1396"></A><h4>Step 4: Determine whether to use connection or
session pooling</h4>
<A NAME="TI1397"></A><p>Oracle client interface (OCI) pooling for PowerBuilder applications
is created when you connect to an Oracle server for the first time.
The pooling is identified by the server name and character set which
are passed in the DBPARM parameters SQLCA.ServerName and NLS_Charset,
respectively. If two Oracle connections are connected to the same
Oracle server but use different character sets, the connections
must reside in different connection or session pools. All pooling-related
DBPARM parameters must be set before the initial database connection
from PowerBuilder.</p>
<A NAME="TI1398"></A><p>Session pooling means that the application creates and maintains
a group of stateless sessions to the database. These sessions are
passed to thin clients as requested. If no session is available,
a new one is created. When the client is done with the session,
the client releases it to the pool. With session pooling, the number
of sessions in the pool can increase dynamically.</p>
<A NAME="TI1399"></A><p>Session pooling does not support external authentication using
an OS account. If a Login ID is not specified in a database connection
using an existing session pool, the Login ID of the session pooling
creator is used for the connection. </p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>CNNPool parameter maintained for backward compatibiity </span> <A NAME="TI1400"></A>The O90 and O10 database drivers that you can use in PowerBuilder
to connect to the 9.x and 10.x versions of the Oracle DBMS support
connection pooling with the DBPARM parameter CNNPool. For backward
compatibility purposes, this parameter is also supported by the
ORA driver that you use with Oracle 11<i>g</i>. However,
if the Pooling parameter is used with this driver, the CNNPool parameter
is ignored.</p>
<p><b>Deciding on pooling type</b>   <A HREF="connpbp67.htm#CIAFBICA">Table 10-3</A> describes
the circumstances under which you should make your pooling selection.</p>
<A NAME="CIAFBICA"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 10-3: Pooling types and when or when
not to use them</caption>
<tr><th  rowspan="1"  ><A NAME="TI1401"></A>Choose</th>
<th  rowspan="1"  ><A NAME="TI1402"></A>When database sessions are</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1403"></A>Session pooling</td>
<td  rowspan="1"  ><A NAME="TI1404"></A>Stateless (reusable by middle tier threads)
and the number of back-end server processes can cause database scaling problems.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1405"></A>Connection pooling</td>
<td  rowspan="1"  ><A NAME="TI1406"></A>Stateful (not reusable by middle tier
threads) and the number of back-end server processes can cause database
scaling problems. The number of physical connections and back-end server
processes is reduced by using connection pooling. Therefore many
more database sessions can be utilized for the same back-end server
configuration.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1407"></A>No pooling</td>
<td  rowspan="1"  ><A NAME="TI1408"></A>Stateful (not reusable by middle tier
threads) and the number of back-end server processes will never
be large enough to cause scaling issues for the database. <A NAME="TI1409"></A><p>EAServer components and MTS components do not support either
type of pooling for Oracle databases.</p></td>
</tr>
</table>
<p><b>Setting pooling parameters</b>   The database profile dialog box for an Oracle 11<i>g</i> connection
includes a Pooling tab that lets you select the pooling parameters
listed in <A HREF="connpbp67.htm#CIADCBEF">Table 10-4</A>.</p>
<A NAME="CIADCBEF"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 10-4: Pooling parameters for the ORA
driver</caption>
<tr><th  rowspan="1"  ><A NAME="TI1410"></A>Pooling parameter</th>
<th  rowspan="1"  ><A NAME="TI1411"></A>Description</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1412"></A>Pooling Type</td>
<td  rowspan="1"  ><A NAME="TI1413"></A>You can select Session Pooling, Connection
Pooling, or None (default). Sets the Pooling DBPARM.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1414"></A>Runtime Connection Load Balancing</td>
<td  rowspan="1"  ><A NAME="TI1415"></A>This check box selected by default. It
is ignored when you select Connection Pooling or None for the Pooling
Type. Sets the RTConnBalancing DBPARM.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1416"></A>Homogeneous Session</td>
<td  rowspan="1"  ><A NAME="TI1417"></A>This check box is not selected by default
and is valid for session pooling only. When selected, all sessions
in the pool are authenticated with the user name and password in effect
when the session pool was created. The user name and password in
later connection requests are ignored. Proxy sessions cannot be
created in homogeneous sessioon mode. Sets the SessionHomogeneous
DBPARM.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1418"></A>Minimum Number of Sessions</td>
<td  rowspan="1"  ><A NAME="TI1419"></A>Integer for the minimum number of database
connection sessions; value is 1 by default. Sets the CSMin DBPARM. This
value is ignored when the SessionHomogeneous DBPARM is set to false.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1420"></A>Maximum Number of Sessions</td>
<td  rowspan="1"  ><A NAME="TI1421"></A>Integer for the maximum number of database
connection sessions; value is 100 by default. Sets the CSMax DBPARM.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1422"></A>Increment</td>
<td  rowspan="1"  ><A NAME="TI1423"></A>Integer for database connection increments
per session; value is 1 by default. Sets the CSIncr DBPARM. This value
is ignored when the SessionHomogeneous DBPARM is set to false.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1424"></A>Pool Creator</td>
<td  rowspan="1"  ><A NAME="TI1425"></A>User name used to create the connection
or session pool when the pool is not already created. Sets the PoolCreator DBParm
to a string for the user name prior to the database connection.
If you do not provide a value for the PoolCreator DBParm, the Transaction
object's LogID and LogPass properties are used to create
the pooling.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI1426"></A>Password</td>
<td  rowspan="1"  ><A NAME="TI1427"></A>Password used to create the connection
or session pool when the pool is not already created. Sets the PoolPwd DBParm
to a string for the password for the pool creator.</td>
</tr>
</table>

